package org.lemma.set;

import javax.annotation.Author;
import javax.annotation.Copyright;
import javax.annotation.Version;
import org.lemma.number.Numeric;

/**
 * <p>
 *  TODO: Javadoc for {@code Function}
 * </p>
 *
 * @param <D> The object type for the domain
 * @param <R> The object type for the rainge
 * @author Chris Beatty [christopher.beatty@gmail.com]
 * @version 1.0.0
 */
@Version(
    major   = "1",
    minor   = "0",
    patch   = "0",
    date    = "2006-10-10T12:00:00-5:00",
    authors = { @Author(name = "Chris Beatty", email = "christopher.beatty@gmail.com") }
)
@Copyright
public interface Function<D, R, M extends Numeric> extends Relation<D,R,M> {

    /**
     * 
     * @param element
     * @return
     */
    @Override
    public FiniteSet<R,M> relate(final D element);
    
    /**
     * 
     * @param element
     * @return
     */
    public Tuple<R,M> evaluate(final D element);
    
    /**
     * 
     * @param <R1>
     * @param g
     * @return
     */
    public <R1> Function<D,R1,M> compose(final Function<R,R1,M> g);

}
